package com.chentongwei.spring.annotation.bean.entity;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author TongWei.Chen 2018-07-10 10:51:21
 * @Description:
 * @Project spring-annonation
 */
public class Dog {

    public Dog() {
        System.out.println("dog constructor...");
    }

    // 对象创建并赋值之后
    @PostConstruct
    public void init() {
        System.out.println("dog postconstructor...");
    }

    // 在容器移除对象之前
    @PreDestroy
    public void destroy() {
        System.out.println("dog PreDestroy ...");
    }
}
